/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package estates.addon;

import estates.model.Estate;
import estates.model.Dekorator;
import java.util.Comparator;

/**
 *
 * @author gacek
 */ 
public class PorownanieKaskadoweOfert  implements Comparator<Estate> {

public int compare(Estate arg0, Estate arg1) {
        int wynik;
        if (((Dekorator) arg0).getTypOferty() == 2) //kolejne sortowanie
        {
            if ((wynik = arg0.compareTo(arg1)) != 0) //Oferta
            {
                return wynik;
            }
        }

        return 0;
    }

}
